<?php
if ($_SERVER["REQUEST_METHOD"] == "POST") {
    $row = $_POST['row'];
    $col = $_POST['col'];
    $player = $_POST['player'];

    // 这里可以添加更复杂的逻辑，例如判断胜负等
    // 简单示例：记录落子信息
    $logMessage = "Player $player placed a piece at row $row, col $col\n";
    file_put_contents('game_log.txt', $logMessage, FILE_APPEND);

    echo "Move recorded successfully";
}
?>